package com.yohann.designPattern.factory.abstractFactory.factory;

import com.yohann.designPattern.factory.factoryMethod.pizza.LondonCheesePizza;
import com.yohann.designPattern.factory.factoryMethod.pizza.LondonPepperPizza;
import com.yohann.designPattern.factory.simpleFactory.pizza.Pizza;

/**
 * <p>
 * 伦敦奶酪工厂
 * </p>
 *
 * @author Yohann
 * @since 2021/2/1 21:12
 */
public class LondonFactory implements AbstractFactory{
    @Override
    public Pizza create(String type) {
        Pizza pizza = null;
        if (type.equals("cheese")) {
            pizza = new LondonCheesePizza();
        } else if (type.equals("pepper")) {
            pizza = new LondonPepperPizza();
        }

        return pizza;
    }
}